<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:forEach items="${phoneGoodsList}" var="goods">
	<c:if test="${goods.storeStock>0}">
		<figure class="parts_goods_item clearfix"
			onclick="detailFunc('${goods.goodsCode}','${goods.storeCode}')">
			<div class="parts_goods_item_img pad0">
				<a href="javascript:void(0)"> <img
					src="${ctxWeb}/web/file/getFile?filePath=${goods.imgList[0]}" alt="" />
				</a>
			</div>
			<div class="parts_goods_list clearfix">
				<div class="parts_goods_item_mid_ph col-xs-12 pad0">
					<h4 class="title">
						<b>${fns:getDictLabel(goods.storeType, 'store_type', '')}</b> 
						<span class="noWrapEllipsis parts_title">${goods.cnName}</span>
					</h4>
					<p class="gry">
						<em>配件编号：</em> <span>${goods.partCode}</span>
					</p>
					<p class="hy_price">¥ ${goods.price}</p>
					<p class=" red ph_hy_mush">
						<span>会员价：
							<c:choose>
								<c:when test="${not empty user.userType&&user.userType==2}">
									¥${goods.vipPrice}
								</c:when>
								<c:otherwise>
									会员可见
								</c:otherwise>
							</c:choose>
						</span>  <a onclick="addShoppingCart('${goods.storeCode}','${goods.goodsCode }')" href="javascript:;"
													class="enter_shopping">加入购物车</a>
					</p>
				</div>
			</div>
		</figure>
	</c:if>
	<c:if test="${goods.storeStock==0}">
		<figure class="parts_goods_item clearfix">
			<div class="parts_goods_item_img pad0">
				<a href="javascript:void(0)"> <img
					src="${ctxWeb}/web/file/getFile?filePath=${goods.imgList[0]}" alt="" />
				</a>
				<p class="pos_goods">暂时无货</p>
			</div>
			<div class="parts_goods_list clearfix">
				<div class="parts_goods_item_mid_ph col-xs-12 pad0">
					<h4 class="title">
						<b>${fns:getDictLabel(goods.storeType, 'store_type', '')}</b>
						<span class="noWrapEllipsis parts_title">${goods.cnName}</span>
					</h4>
					<p class="gry">
						<em>配件编号：</em> <span>${goods.partCode}</span>
					</p>
					<p class="red">¥ ${goods.price}</p>
					<p class="hy_price ph_hy_mush">
						<span>会员价：
							<c:choose>
								<c:when test="${not empty user.userType&&user.userType==2}">
									¥${goods.vipPrice}
								</c:when>
								<c:otherwise>
									会员可见
								</c:otherwise>
							</c:choose>
						</span> 
				<%-- 		<a href="${ctxWeb }/shoppingCart/addShoppingCart?storeCode='${goods.storeCode}'&goodsCode='${goods.goodsCode }'"
							class="enter_shopping text-center disabled_gry">加入购物车</a> --%>
						<a class="enter_shopping text-center disabled_gry">加入购物车</a>
					</p>
				</div>
			</div>
		</figure>
	</c:if>
</c:forEach>
